﻿<div class="path_menu">
    <div class="path_menu_item">
        <a href="@Url.Content("~/")">Home Page</a>
    </div>
    <div class="path_menu_item">
        <a href="@Url.Content("~/administrator/competitions")">Conpetitions</a>
    </div>
    <div class="path_menu_item">
        <a href="">Edit competition</a>
    </div>
</div>
<div class="path_menu context_menu">
    <a href="#">Danh sách sản phẩm</a> <span>|</span> <a href="#">Danh mục sản phẩm</a>
    <span>|</span> <a href="#">Đánh giá, nhận xét sản phẩm</a>
</div>
<form action="" method="post" enctype="multipart/form-data">
<div class="path_menu title_and_action">
    <div class="content_title">
        Edit competition
    </div>
    <div class="content_action">
        <div class="item_content_action">
            <div class="img_item_content_action" id="help_action">
            </div>
            <div class="text_item_content_action">
                Help
            </div>
        </div>
        <div class="item_content_action">
            <a href="@Url.Content("~/administrator/competitions/")">
                <div class="img_item_content_action" id="go_back_action1">
                </div>
                <div class="text_item_content_action">
                    Close
                </div>
            </a>
        </div>
        <div class="item_content_action">
            <div class="img_item_content_action">
                <input type="submit" name="submit_competition" class="bt_category_submit" value="" />
            </div>
            <div class="text_item_content_action">
                Save
            </div>
        </div>
    </div>
    <!--#END content_action-->
</div>
<!--#END path_menu title_and_action-->
@if (ViewBag.error != null)
{
    <div class="path_menu error">
        @Html.Raw(ViewBag.error)
    </div>
}
@if (ViewBag.success != null)
{
    <div class="path_menu success">
        @Html.Raw(ViewBag.success)
    </div>
}
<!--===================================CHO DANH CHO VIEC SHOW FORM=================================================-->
<div class="path_menu">
    <div class="form_panel">
        <div class="tab_form_panel">
            <div class="item_tab_form_panel item_tab_form_panel_show" id="item_tab_form_panel1">
                Competition Detail
            </div>
        </div>
        <div class="content_form_panel">
            <div class="item_content_form_panel" id="item_content_form_panel1">
                <div class="item_item_content_form">
                    <div class="title_item_item_form">
                        <span>*</span> Competition Name
                    </div>
                    <div class="input_item_item_form">
                        <input type="text" class="txt_input_item_item" id="Name-Item" name="Name" value="@try
                                                                                          {@ViewBag.dataForm["Name"]}
                                                                                          catch { }"/>
                    </div>
                </div>
                <div class="item_item_content_form">
                    <div class="title_item_item_form">
                        <span>*</span> Competition Alias
                    </div>
                    <div class="input_item_item_form">
                        <input type="text" class="txt_input_item_item" id="Alias-Item" name="Alias" value="@try
                                                                                           {@ViewBag.dataForm["Alias"]}
                                                                                           catch { }"/>
                    </div>
                </div>
                <div class="item_item_content_form">
                    <div class="title_item_item_form">
                        <span>*</span> Image(W:H ~ 1:1)
                    </div>
                    <div class="input_item_item_form">
                        <input type="file" class="" name="Images" />
                    </div>
                </div>
                <div class="item_item_content_form">
                    <div class="title_item_item_form">
                        <span>*</span> Teachers scoring
                    </div>
                    <div class="input_item_item_form">
                        <select multiple="multiple" size="10" name="Staffs">
                            <option value="-1" selected="selected">Chose teachers scoring for competition...</option>
                            @foreach (eProjectsSemIII.Models.Members member in ViewBag.listStaff)
                            {
                                try
                                {
                                    bool hasItem = false;
                                    foreach (int item in ViewBag.IDStaffs)
                                    {
                                        if (item == member.ID)
                                        {
                                            hasItem = true;
                                <option value="@member.ID" selected="selected">@member.Name</option>
                                            break;
                                        }

                                    }
                                    if (hasItem == false)
                                    {
                                <option value="@member.ID">@member.Name</option>
                                    }
                                }
                                catch
                                {
                                <option value="@member.ID">@member.Name</option>
                                }

                            }
                        </select>
                    </div>
                </div>
                <div class="item_item_content_form">
                    <div class="title_item_item_form">
                        <span>*</span> Conditions of Competition
                    </div>
                    <div class="input_item_item_form">
                        <select multiple="multiple" size="10" name="Conditions">
                            <option value="-1" selected="selected">Chose conditions for competition...</option>
                            @foreach (eProjectsSemIII.Models.Conditions condition in ViewBag.listCondition)
                            {
                                try
                                {
                                    bool hasItem = false;
                                    foreach (int item in ViewBag.IDConditions)
                                    {
                                        if (item == condition.ID)
                                        {
                                            hasItem = true;
                                <option value="@condition.ID" selected="selected">@condition.Description</option>
                                            break;
                                        }

                                    }
                                    if (hasItem == false)
                                    {
                                <option value="@condition.ID">@condition.Description</option>
                                    }
                                }
                                catch
                                {
                                <option value="@condition.ID">@condition.Description</option>
                                }
                            }
                        </select>
                    </div>
                </div>
                <div class="item_item_content_form">
                    <div class="title_item_item_form">
                        <span>*</span> Awards of Competition
                    </div>
                    <div class="input_item_item_form">
                        <select multiple="multiple" size="10" name="Awards">
                            <option value="-1" selected="selected">Chose awards for competition...</option>
                            @foreach (eProjectsSemIII.Models.Awards award in ViewBag.listAward)
                            {
                                try
                                {
                                    bool hasItem = false;
                                    foreach (int item in ViewBag.IDAwards)
                                    {
                                        if (item == award.ID)
                                        {
                                            hasItem = true;
                                <option value="@award.ID" selected="selected">Level @award.Level:: @award.Description</option>
                                            break;
                                        }

                                    }
                                    if (hasItem == false)
                                    {
                                <option value="@award.ID">Level @award.Level:: @award.Description</option>
                                    }
                                }
                                catch
                                {
                                <option value="@award.ID">Level @award.Level:: @award.Description</option>
                                }
                            }
                        </select>
                    </div>
                </div>
                <div class="item_item_content_form">
                    <div class="title_item_item_form">
                        <span>*</span> Kinds of Competition
                    </div>
                    <div class="input_item_item_form">
                        <select multiple="multiple" size="10" name="Kinds">
                            <option value="-1" selected="selected">Chose kinds for competition...</option>
                            @foreach (eProjectsSemIII.Models.Kinds kind in ViewBag.listKind)
                            {
                                try
                                {
                                    bool hasItem = false;
                                    foreach (int item in ViewBag.IDKinds)
                                    {
                                        if (item == kind.ID)
                                        {
                                            hasItem = true;
                                <option value="@kind.ID" selected="selected">@kind.Name</option>
                                            break;
                                        }

                                    }
                                    if (hasItem == false)
                                    {
                                <option value="@kind.ID">@kind.Name</option>
                                    }
                                }
                                catch
                                {
                                <option value="@kind.ID">@kind.Name</option>
                                }
                            }
                        </select>
                    </div>
                </div>
                <div class="item_item_content_form">
                    <div class="title_item_item_form">
                        <span>*</span> Start Date (dd/MM/yyyy)
                    </div>
                    <div class="input_item_item_form">
                        <input type="text" id="StartDate" name="StartDate" class="txt_input_item_item" value="@try
                                                                                                              {@ViewBag.dataForm["StartDate"]}
                                                                                                              catch { }"/>
                    </div>
                </div>
                <div class="item_item_content_form">
                    <div class="title_item_item_form">
                        <span>*</span> Deadline Date (dd/MM/yyyy)
                    </div>
                    <div class="input_item_item_form">
                        <input type="text" id="DeadlineDate" name="DeadlineDate" value="@try
                                                                                        {@ViewBag.dataForm["DeadlineDate"]}
                                                                                        catch { }" class="txt_input_item_item" />
                    </div>
                </div>
                <div class="item_item_content_form">
                    <div class="title_item_item_form">
                        <span>*</span> End Date (dd/MM/yyyy)
                    </div>
                    <div class="input_item_item_form">
                        <input type="text" id="EndDate" name="EndDate" value="@try
                                                                              {@ViewBag.dataForm["EndDate"]}
                                                                              catch { }" class="txt_input_item_item" />
                    </div>
                </div>
                <div class="item_item_content_form">
                    <div class="title_item_item_form">
                        Description
                    </div>
                    <div class="input_item_item_form">
                        <textarea cols="" rows="" name="Summary" class="txt_textarea_product">@try
                         {@ViewBag.dataForm["Summary"]}
                         catch { }</textarea>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<!--================================#END CHO DANH CHO VIEC SHOW FORM===============================================-->
<div class="path_menu title_and_action">
    <div class="content_title">
        Edit competition
    </div>
    <div class="content_action">
        <div class="item_content_action">
            <div class="img_item_content_action" id="help_action1">
            </div>
            <div class="text_item_content_action">
                Help
            </div>
        </div>
        <div class="item_content_action">
            <a href="@Url.Content("~/administrator/competitions/")">
                <div class="img_item_content_action" id="go_back_action">
                </div>
                <div class="text_item_content_action">
                    Close
                </div>
            </a>
        </div>
        <div class="item_content_action">
            <div class="img_item_content_action">
                <input type="submit" name="submit_competition" class="bt_category_submit" value="" />
            </div>
            <div class="text_item_content_action">
                Save
            </div>
        </div>
    </div>
    <!--#END content_action-->
</div>
<!--#END path_menu title_and_action-->
</form>
